import React, { useState, useEffect } from 'react'
import Message from './Message'

const ChatInterface = () => {
    const [time, setTime] = useState(new Date());
    const [count, setCount] = useState(0);
    setInterval(() => {
      const now = new Date();
      setTime(now)
    }, 1000)
    useEffect(() => {
      document.title = '当前时间-'+ time.toString()
    })
    return (
        <div>
          <h1>Chat Interface</h1>
          <Message />
        </div>
    )
}
export default ChatInterface
